include ../makeEnviroment.conf
SRCS = $(wildcard *.c)
TARGET = test

CFLAGS += -I./common/ -I./deviceOperate -I./dealCommand -I./protocolParse
SRCS+= ./common/typescommon.c
SRCS+= ./common/charQueue.c
SRCS+= ./common/threadExcuter.c
SRCS+= ./common/genrand.c

SRCS+= ./deviceOperate/deviceParameter.c

SRCS+= ./protocolParse/protocolProcesser.c
SRCS+= ./protocolParse/protocolParseCommon.c
SRCS+= ./protocolParse/hashCommandActuator.c

SRCS+= ./dealCommand/commandList.c
SRCS+= ./dealCommand/commandSetReadSN.c
SRCS+= ./dealCommand/commandSetAddressBySN.c

$(info srcs: $(SRCS))
OBJS = $(patsubst %.c,%.o,$(SRCS))
$(info objs: $(OBJS))


all:$(OBJS)
	$(GCC) -o $(TARGET) $(OBJS) $(CFLAGS) -pthread -O3

$(OBJS):%.o:%.c
	$(GCC) -c $^ -o $@ $(CFLAGS)

clean:
	rm -f *.o $(TARGET) $(OBJS)
